package hutool;

import cn.hutool.bloomfilter.BitMapBloomFilter;
import cn.hutool.bloomfilter.BloomFilter;
import cn.hutool.bloomfilter.filter.DefaultFilter;

public class BloomFilterDemo {
    public static void main(String[] args) {
//        BloomFilter filter = new DefaultFilter(100);
        BloomFilter filter = new BitMapBloomFilter(10);
        for (int i = 0; i < 20; i++) {
            filter.add("test-" + i);
        }
        System.out.println(filter.contains("test-10"));
    }
}
